export const adaptCanvas = (designWidth, designHeight) => { // 适配
    const canvas = cc.director.getScene().getChildByName('Canvas').getComponent(cc.Canvas)
    const designRatio = designWidth / designHeight
    const screenRatio = cc.winSize.width / cc.winSize.height

    if (screenRatio > designRatio) {
        canvas.fitWidth = false
        canvas.fitHeight = true
    } else {
        canvas.fitWidth = false
        canvas.fitHeight = true
    }

}

export const eventType = {
    showPlotById: 'show_plot_by_id',
    showMessage: 'show_message'
}
